<!--#layout("/common/layout.html",{"jsBase":"/js/customer/customerInfo/"}){ -->
<style>
    .laytable-cell-1-wxPicurl {
        height: 100%;
        width: 100%;
    }
    .layui-table-cell{
        height: 75px;
        line-height: 75px;
    }
</style>
<div class="layui-row" xmlns:layui="http://www.w3.org/1999/xlink">
    <form id="searchForm" class="layui-form layui-form-pane">
        <div class="layui-collapse" lay-filter="condictionCol">
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">查询条件</h2>
                <div class="layui-colla-content layui-show">
                    <div class="layui-row">
                        <div class="layui-form-item">
                            <div class="layui-inline">

                                <label class="layui-form-label">权限类别</label>
                                <div class="layui-input-inline">
                                    <layui:simpleDataSelect name="roleId" value="" data="${roleList}"
                                                            attrId="roleId" attrName="roleName"/>
                                </div>

                                <label class="layui-form-label">注册类型 </label>
                                <div class="layui-input-inline">
                                    <layui:simpleDictSelect style='layui-input-inline' type="reg_type" layVerify=""
                                                            id="regType" name="regType" value="" />
                                </div>

                                <label class="layui-form-label">业务模块</label>
                                <div class="layui-input-inline">
                                    <layui:simpleDataSelect name="module" value="" data="${moduleList}"
                                                            attrId="dictId" attrName="dictValue"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">来源渠道</label>
                                <div class="layui-input-inline">
                                    <layui:simpleDataSelect name="channel" value="" data="${channelList}"
                                                            attrId="channelCode" attrName="channelName"/>
                                </div>
                                <label class="layui-form-label">真名</label>

                                <div class="layui-input-inline">
                                    <input type="text" name="customerName" autocomplete="off" class="layui-input">
                                </div>

                                <label class="layui-form-label">会员等级</label>

                                <div class="layui-input-inline">
                                    <input type="text" name="customerLevel" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">

                                <label class="layui-form-label">绑定手机号</label>

                                <div class="layui-input-inline">
                                    <input type="text" name="phone" id="phone" autocomplete="off" class="layui-input" onblur="checkPhone()" >
                                </div>

                                <label class="layui-form-label">所属组织</label>

                                <div class="layui-input-inline">
                                    <layui:simpleDataSelect name="orgId" value="" data="${orgList}"
                                                            attrId="id" attrName="name" laySearch="true"/>
                                </div>

                                <label class="layui-form-label">直播权限</label>

                                <div class="layui-input-inline">
                                    <select name="zhiboPower" lay-verify="">
                                        <option value="">不限制</option>
                                        <option value="1">有</option>
                                        <option value="0">无</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">是否为老师</label>
                                <div class="layui-input-inline">
                                    <select name="isTeacher" lay-verify="">
                                        <option value="">不限制</option>
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </div>

                                <label class="layui-form-label">可用标记</label>
                                <div class="layui-input-inline">
                                    <select name="custStatus" lay-verify="">
                                        <option value="">不限制</option>
                                        <option value="1">可用</option>
                                        <option value="0">禁用</option>
                                    </select>
                                </div>

                                <label class="layui-form-label">注册时间</label>
                                <div class="layui-input-inline">
                                    <div class="date-range-pick">
                                        <input type="text" name="registerTimeQuery" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">注册手机号</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="sourceId" autocomplete="off" class="layui-input" id="sourceId" onblur="checkSourceId()">
                                </div>
                                <label class="layui-form-label">会员ID</label>

                                <div class="layui-input-inline">
                                    <input type="text" name="customerId" autocomplete="off" class="layui-input">
                                </div>

                                <label class="layui-form-label">微信昵称</label>

                                <div class="layui-input-inline">
                                    <input type="text" name="wxUname" autocomplete="off" class="layui-input">
                                </div>

                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">高考省份</label>
                                <div class="layui-input-inline">
                                    <layui:simpleDataSelect name="provinceId" value="" data="${provinceList}"
                                                            attrId="provId" attrName="provName"/>
                                </div>


                                <button style="float: right;" class="layui-btn layui-btn-normal" type="button" id="searchFormSearch">搜索</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="layui-btn-group">
    <layui:accessButton function="customer.customerInfo.view" action="view">查看信息</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.emp" action="emp">设为员工</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.edit" action="edit">编辑</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.grant" action="grant">老师授权管理</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.exam" action="exam">高考信息修改</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.importDocument" action="importDocument">热点精读</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.revokeRead" action="revokeRead">收回热点精读权限</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.login" action="login">PC模拟登陆</layui:accessButton>
    <layui:accessButton function="customer.customerInfo.login" action="h5login">H5模拟登陆</layui:accessButton>
</div>

<table id="customerInfoTable" lay-filter="customerInfoTable"></table>

<!--#} -->
<script type="text/html" id="imgTpl">
    <img src="{{ d.avatar }}">
</script>
<script>
    layui.use(['index'], function () {
        var index = layui.index
        index.init();
       window.checkPhone = function(){
            var phone = $("#phone").val();
            if(phone.length!=11){
                Common.info("手机号码必须11位");
                return;
            }
            if(!(/^1[3456789]\d{9}$/.test(phone))){
                Common.info("手机号码有误，请重填");
                return ;
            }
        }

        window.checkSourceId = function(){
            var phone = $("#sourceId").val();
            if(phone.length!=11){
                Common.info("手机号码必须11位");
                return;
            }
            if(!(/^1[3456789]\d{9}$/.test(phone))){
                Common.info("手机号码有误，请重填");
                return ;
            }
        }
    });
</script>
